#ifndef _TIMER_H
#define _TIMER_H
#include "ttypes.h"

inline uint64 r_time() {
  uint64 x;
  asm volatile("csrr %0, time" : "=r"(x));
  return x;
}

void set_timer(uint64 stime_value);
uint64 get_cycle();
void clock_set_next_event();
void init_timer();

#endif // _TIMER_H
